<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>3.模拟一个Vue的数据代理</title>
  </head>
  <body>
    <script type="text/javascript" >
      const vm = {
        _uid:0,
        _isVue: true,
        _data:{
          school:'尚硅谷',
          address:'宏福科技园'
        }
      }
      
      Object.defineProperty(vm,'school',{
        get(){
          return vm._data.school
        },
        set(value){
          vm._data.school = value
        }
      })
      Object.defineProperty(vm,'address',{
        get(){
          return vm._data.address
        },
        set(value){
          vm._data.address = value
        }
      })

      console.log(Object.keys(vm._data))
    </script>
  </body>
</html>